package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.SimpleValueSpecification;

/**
 * @author Bright Lee
 */
public final class ExecuteImmediateStatement implements SqlDynamicStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private SimpleValueSpecification sqlStatementVariable;

    public ExecuteImmediateStatement(int beginIndex,
                                     SimpleValueSpecification sqlStatementVariable) {
        this.beginIndex = beginIndex;
        this.endIndex = sqlStatementVariable.getEndIndex();
        this.sqlStatementVariable = sqlStatementVariable;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SimpleValueSpecification getSqlStatementVariable() {
        return sqlStatementVariable;
    }

}
